#!/usr/bin/bash
wslpath2=${1//\\/\/}
signal=`echo ${wslpath2:0:1} | tr 'A-Z' 'a-z'`
path='/mnt/'${signal}'/'${wslpath2#*/}
if [ -f ${path} ]; then
    path=${path%/*}
fi
echo ${path}
bash -c "cd '${path}'; bash"

# === call from cmd.exe ===
# cmd.exe /K bash /mnt/<<DOTFILES_wsl_path>>/Windows/wsl_location.sh {actionpath}
